﻿<div>
	<h2>Search Results  - <a style="height: 36px" data-ng-click="goBack()">Back</a></h2>
	<div>
		<div data-ui-view="search-criteria"></div>
	</div>
	<p data-ng-show="loading"><i>Loading...</i></p>
	<p data-ng-show="!loading && !hasResults && message.length < 1"><i>No images were found based on the criteria</i></p>
	<p data-ng-show="message.length>0"><i>{{message}}&nbsp;<a data-ng-show="retry.allow" data-ng-click="retry.retrySearch()">Click here to try the search again.</a></i></p>

	<div data-ng-show="hasResults && !loading && message.length < 1">
		<h3>Results:</h3>
		<div style="float: left; display: block; width: 750px;">
			<div data-ng-repeat="image in images.pageItems" class="image-container">
				<div class="image-item">
					<div style="height: 140px;">
						<img class="image" data-ng-dblclick="viewImage(image)"
							data-ng-src="/api/image/getthumb/{{image.Id}}" />
					</div>
					<div class="name-div">
						<div class="image-name">{{image.Name}}</div>
						<span data-ng-show="model.authUser">
							<img class="fav-img" src="../../../Content/images/favorite_add.png"
								data-ng-hide="isImageAFavorite(image.Id)"
								data-ng-click="setImageAsFavorite(image.Id)" />
							<img class="fav-img" src="../../../Content/images/favorite_selected.png"
								data-ng-show="isImageAFavorite(image.Id)"
								data-ng-click="removeImageAsFavorite(image.Id)" />
						</span>
					</div>
				</div>
			</div>
			<div>
				<button data-ng-click="images.previousPage()" data-ng-show="images.paging.number>1">Previous Page</button>
				<button data-ng-click="images.nextPage()" data-ng-show="images.paging.number<images.paging.total">Next Page</button>
			</div>
		</div>
	</div>
</div>
